{extend name="../application/public/base.html" /}
{block name="head"}
    <link rel="stylesheet" href="ADMIN_CUSTOM/css/btn.css">
    <link rel="stylesheet" href="ADMIN_CUSTOM/css/form.css">
{/block}
{block name="body"}
    <body>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                      <form class="layui-form">
                        <div class="layui-card-body">
                            <div class="layui-btn" onclick="update_user(this)">编辑</div>
                            <div class="layui-btn update-box layui-bg-red" lay-filter="update" lay-submit="">确定</div>
                        </div>
                        <div class="layui-card-body">
							<div class="layui-tab-content tab-content-form">
								<div class="layui-tab-content" style="height: 320px;">
									<div class="user-img" id="upload-box">
                                        <input type="hidden" name="user_img" value="{$row.user_img}">
                                        <img src="{$row.user_img}">
									</div>
									<ul class="user-info">
										<li>客户编号：{$row.user_sn}</li>
										<li>客户类型：{$row.u_type}</li>
										<li>客户姓名：{$row.username}</li>
										<li>客户称呼：{$row.nkname}</li>
										<li>性别：{$row.sex}</li>
										<li>年龄：{$row.age}</li>
										<li>联系方式：{$row.phone}</li>
										<li>备用联系方式：{$row.spare_phone}</li>
										<li>来店次数：{$row.number}</li>
										<li>最近购买时间：{$row.buy_time}</li>
										<li>订单记录：<div class="layui-btn layui-bg-red" onclick="xadmin.open('订单记录','/user/order/index/user_sn/dasdas')">查看订单记录</div></li>
										<li>拜访时间：{$row.visit}天</li>
									</ul>
                                    <ul class="user-info update-box">
                                        <li>客户编号：{$row.user_sn}</li>
                                        <li>客户类型：{$row.u_type}</li>
                                        <li>
                                            <label>客户姓名：</label>
                                            <div class="layui-input-inline">
                                                <input type="text" lay-verify="required" placeholder="请输入客户姓名" name="username" class="layui-input" value="{$row.username}">
                                            </div>
                                        </li>
                                        <li>
                                            <label>客户称呼：</label>
                                            <div class="layui-input-inline">
                                                <input type="text" placeholder="请输入客户姓名" name="nkname" class="layui-input" value="{$row.nkname}">
                                            </div>
                                        </li>
                                        <li>
                                            <label>性别：</label>
                                            <div class="layui-input-inline">
                                                <select class="layui-input" name="sex">
                                                    <option {if condition="$row->getData('sex') == 1"} selected="selected" {/if} value="1">男</option>
                                                    <option {if condition="$row->getData('sex') == 2"} selected="selected" {/if} value="2">女</option>
                                                </select>
                                            </div>
                                        </li>
                                        <li>
                                            <label>年龄：</label>
                                            <div class="layui-input-inline">
                                                <input type="text" placeholder="请输入年龄" name="age" class="layui-input" value="{$row.age}">
                                            </div>
                                        </li>
                                        <li>
                                            <label>联系方式：</label>
                                            <div class="layui-input-inline">
                                                <input type="text" placeholder="请输入联系方式" name="phone" class="layui-input" lay-verify="required|phone" value="{$row.phone}">
                                            </div>
                                        </li>
                                        <li>
                                            <label>备用联系方式：</label>
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" lay-verify="isphone" autocomplete="off" placeholder="备用联系方式" name="spare_phone" value="{$row.spare_phone}">
                                            </div>
                                        </li>
                                        <li>来店次数：{$row.number}</li>
                                        <li>最近购买时间：{$row.buy_time}</li>
                                        <li>订单记录：<div class="layui-btn layui-bg-red" onclick="xadmin.open('订单记录','/user/order/index/user_sn/dasdas')">查看订单记录</div></li>
                                        <li>
                                            <label>拜访时间：</label>
                                            <div class="layui-input-inline">
                                                <input type="text" placeholder="请输入拜访时间" name="visit" class="layui-input" value="{$row.visit}">
                                            </div>
                                            天
                                        </li>
                                    </ul>
								</div>
						  	</div>
                        </div>
                      </form>
                    </div>
                </div>
            </div>
        </div> 
    </body>
{/block}
{block name="script"}
    <script type="text/javascript" src="ADMIN_CUSTOM/js/user/user/edit.js"></script>
{/block}